package emp_demo;

public class Emp extends Person{
    int ID;
    double salary;
    int years;
    int name[]={};
    //构造方法
    public Emp(String name, String address, int ID, double salary, int years) {
        super(name, address);
        this.ID = ID;
        this.salary = salary;
        this.years = years;
    }
    public Emp(){

    }



    @Override
    public void add() {
        System.out.println("涨工资20%");
        this.salary=this.salary*0.2+this.salary;
        System.out.println("当前员工的工资为："+this.salary);
    }
}
